import { Application } from "egg";

export default (app: Application) => {
    const { controller, router } = app;
    router.get("/", controller.home.index);
    router.get("/api/user/show", controller.user.show);
    router.put("/api/user/upload", controller.user.upload);
    router.get("/api/user/delete", controller.user.delete);
    router.post("/api/user/add", controller.user.add);
    router.post("/api/user/addUser", controller.user.addUser);
    router.resources("user", "/api/user", controller.user);
    // es测试接口
    router.post("/add", controller.web.search.add);
    router.get("/search", controller.web.search.searchAll);
    router.get("/condition", controller.web.search.genderSearch);
    router.get("/getSearch", controller.web.search.getSearch);
    router.delete("/delete", controller.web.search.delete);
    router.put("/update", controller.web.search.update);
}
